package com.iv.durian.cloud.api.service;

import com.iv.durian.cloud.Notify;
import com.iv.durian.cloud.facade.NotifyFacade;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class NotifyService {

    @Autowired
    private NotifyFacade notifyFacade;

    public void add(Notify notify) {
        notifyFacade.add(notify);
    }

    public Notify getById(Integer notifyId) {
        return notifyFacade.get(notifyId);
    }

    public List<Notify> getlist(Integer userId, Integer status, Integer type, Integer offset, Integer limit) {
        return notifyFacade.list(userId, status, type, offset, limit);
    }

    public int removeById(Integer id) {
        return notifyFacade.remove(id);
    }

    public void update(Notify notify) {
        notifyFacade.update(notify);
    }

    public int count(Notify notify) {
        return notifyFacade.count(notify);
    }
}
